Amortized Rotation Cost in AVL Trees

نویسندگان

  • Mahdi Amani
  • Kevin A. Lai
  • Robert E. Tarjan
چکیده

An AVL tree [1] is the original type of balanced binary search tree. An insertion in an n-node AVL tree takes at most two rotations, but a deletion in an n-node AVL tree can take Θ(log n). A natural question is whether deletions can take many rotations not only in the worst case but in the amortized case as well. A sequence of n successive deletions in an n-node tree takes O(n) rotations [3], but what happens when insertions are intermixed with deletions? Heaupler, Sen, and Tarjan [2] conjectured that alternating insertions and deletions in an n-node AVL tree can cause each deletion to do Ω(log n) rotations, but they provided no construction to justify their claim. We provide such a construction: we show that, for infinitely many n, there is a set E of expensive n-node AVL trees with the property that, given any tree in E, deleting a certain leaf and then reinserting it produces a tree in E, with the deletion having done Θ(log n) rotations. One can do an arbitrary number of such expensive deletion-insertion pairs. The difficulty in obtaining such a construction is that in general the tree produced by an expensive deletion-insertion pair is not the original tree. Indeed, if the trees in E have even height k, 2 deletion-insertion pairs are required to reproduce the original tree.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

New Combinatorial Properties and Algorithms for AVL Trees

In this thesis, new properties of AVL trees and a new partitioning of binary search trees named core partitioning scheme are discussed, this scheme is applied to three binary search trees namely AVL trees, weight-balanced trees, and plain binary search trees. We introduce the core partitioning scheme, which maintains a balanced search tree as a dynamic collection of complete balanced binary tre...

متن کامل

0 Rank - Balanced Trees

Since the invention of AVL trees in 1962, many kinds of binary search trees have been proposed. Notable are red-black trees, in which bottom-up rebalancing after an insertion or deletion takes O(1) amortized time and O(1) rotations worst-case. But the design space of balanced trees has not been fully explored. We continue the exploration. Our contributions are three. We systematically study the...

متن کامل

AVL Trees with Relaxed Balance

The idea of relaxed balance is to uncouple the rebalancing in search trees from the updating in order to speed up request processing in main-memory databases. In this paper, we describe a relaxed version of AVL trees. We prove that each update gives rise to at most a logarithmic number of rebalancing operations and that the number of rebalancing operations in the semidynamic case is amortized c...

متن کامل

An Evaluation of Self-adjusting Binary Search Tree Techniques

Much has been said in praise of self-adjusting data structures, particularly self-adjusting binary search trees. Self-adjusting trees are most suited to skewed key-access distributions as the techniques attempt to place the most commonly accessed keys near the root of the tree. Theoretical bounds on worst-case and amortized performance (i.e. performance over a sequence of operations) have been ...

متن کامل

Lecture 7 — September 23 , 2014

In this lecture we cover Splay Trees, first introduced and analyzed by Sleator and Tarjan in [6]. Splay tree is a comparison based data structure (in particular — Binary Search Tree), which — in contrast to BST data structures such as AVL tree and Red-Black tree — does not maintain a property of being balanced in any way. Thus, in the worst case, complexity of a single operation could be linear...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • Inf. Process. Lett.

دوره 116  شماره 

صفحات  -

تاریخ انتشار 2016